<template>
  <Header></Header>
  <router-view></router-view>
  <Footer></Footer>
</template>

<script>
  import Header from "@/components/Header";
  import Footer from "@/components/Footer";
  import { onMounted } from "vue";
  import { useContactStore } from "@/store/contact"  //引入news仓库
  export default {
    name: "App",
    components: {
      Header,
      Footer,
    }, setup() {
      const store = useContactStore()
      onMounted(() => {
        let token = localStorage.getItem('token')
        if (!token) {
          store.getToken() //获取token
        }

      });
    }
  };
</script>

<style>
</style>